/**
 * @description 组件样式
 * @author: 陈陈
 * @date: 2025/05/09
 * @phone: 18560000860
 * @email: 18560000860@qq.com
 * @company: 济南晨霜信息技术有限公司 /
 * @business: 承接前后端项目的开发
 */
.pure-tabs {
    display: flex;
    text-align: var(--pure-tabs-text-align, center);

    &__left {
        flex-shrink: 0;
    }

    &__content {
        flex: 1;
        overflow: hidden auto;
    }

    &__right {
        flex-shrink: 0;
    }

    &__scroll-view {
        width: 100%;
        height: 100%;
    }

    &__items {
        padding: var(--pure-tabs-items-padding);
        position: relative;
    }

    &__item {
        flex-shrink: 0;
        padding: var(--pure-tabs-item-padding, 10px);
        margin: var(--pure-tabs-item-margin);

        &--active {
            color: var(--pure-tabs-item-active-color, var(--pure-theme-primary));
            font-weight: var(--pure-tabs-item-active-font-weight, 700);
            background: var(--pure-tabs-item-active-background);
        }

        &--disabled {
            opacity: var(--pure-tabs-item-disabled-opacity, var(--pure-opacity-disabled));
            cursor: not-allowed;
            pointer-events: none;
            font-size: var(--pure-tabs-item-disabled-font-size);
            color: var(--pure-tabs-item-disabled-color);
            background: var(--pure-tabs-item-disabled-background);
            font-weight: var(--pure-tabs-item-disabled-font-weight);
        }
    }

    &__indicator {
        position: absolute;
        background: var(--pure-tabs-indicator-background, var(--pure-tabs-item-active-color, var(--pure-theme-primary)));
        z-index: 1;
        border-radius: var(--pure-tabs-indicator-border-radius, 3px);
        transition: var(--pure-tabs-indicator-transition, all 0.3s ease-in-out);
    }

    &--scroll-x {
        flex-direction: row;

        .pure-tabs__items {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            white-space: nowrap;
            gap: var(--pure-tabs-items-gap);
        }

        .pure-tabs__indicator {
            width: var(--pure-tabs-indicator-width, 1em);
            height: var(--pure-tabs-indicator-height, 3px);
            bottom: var(--pure-tabs-indicator-bottom, 0);
            left: calc(var(--pure-tabs-indicator-width, 1em) * -1);
            transform: var(--pure-tabs-indicator-transform, translateX(-50%));
        }
    }

    &--scroll-y {
        flex-direction: column;
        width: var(--pure-tabs-width, 5em);

        .pure-tabs__items {
            display: flex;
            flex-direction: column;
            gap: var(--pure-tabs-items-gap);
        }

        .pure-tabs__indicator {
            width: var(--pure-tabs-indicator-width, 3px);
            height: var(--pure-tabs-indicator-height, 1em);
            left: var(--pure-tabs-indicator-left, 0);
            top: calc(var(--pure-tabs-indicator-height, 1em) * -1);
            transform: var(--pure-tabs-indicator-transform, translateY(-50%));
        }
    }

    &--disabled {
        &.pure-tabs--scroll-x {
            .pure-tabs__items {
                width: 100%;
                overflow: hidden;
            }
        }

        &.pure-tabs--scroll-y {
            .pure-tabs__items {
                height: 100%;
                overflow: hidden;
            }
        }
    }

    &--equal {
        &.pure-tabs--scroll-x {
            .pure-tabs__items {
                width: 100%;
                overflow: hidden;
            }

            .pure-tabs__item {
                flex: 1;
            }
        }

        &.pure-tabs--scroll-y {
            .pure-tabs__items {
                height: 100%;
                overflow: hidden;
            }

            .pure-tabs__item {
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
            }
        }
    }

    &--justify {
        &.pure-tabs--scroll-x {
            .pure-tabs__items {
                width: 100%;
                overflow: hidden;
                justify-content: space-between;
            }
        }

        &.pure-tabs--scroll-y {
            .pure-tabs__items {
                height: 100%;
                overflow: hidden;
                justify-content: space-between;
            }
        }
    }
}
